package com.xianbeiying.app.ckgl.widght.dapengView;

import com.xianbeiying.app.ckgl.http.HttpCallBackUtil;

import java.util.ArrayList;

/**
 * Created by Adminis on 2016/8/22.
 */
public class InstanceDpdate implements Dpdata{
    protected ArrayList<Dpdata> businessResponseArrayList = new ArrayList<Dpdata>();
    public void addResponseListener(Dpdata listener){
        if (!businessResponseArrayList.contains(listener)) {
            businessResponseArrayList.add(listener);
        }
    }
    public void removeResponseListener(HttpCallBackUtil listener) {
        businessResponseArrayList.remove(listener);
    }
    @Override
    public void onDpdata(int sid, boolean isChoice) {
        for (Dpdata iterable_element : businessResponseArrayList) {
            iterable_element.onDpdata(sid,isChoice);
        }
    }
}